package com.atguigu.acl.mapper;

import com.atguigu.acl.entity.Permission;
import com.atguigu.acl.entity.RolePermission;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import org.apache.ibatis.annotations.Param;

import java.util.List;

/**
 * <p>
 * 角色权限 Mapper 接口
 * </p>
 *
 * @author smday
 * @since 2020-08-10
 */
public interface RolePermissionMapper extends BaseMapper<RolePermission> {

    /**
     * 获取指定用户的权限列表
     */
    List<Permission> getPermissionList(Long roleId);

    /**
     * 批量新增角色权限
     */
    int insertList(@Param("list") List<RolePermission> rolePermissionList);
}
